import request from '@/utils/request'

/**
 * @description: 获取客户资料
 * @param {*} params
 * @return {*}
 */
export function getCustomerList(params) {
  return request({
    url: '/customer/list',
    params
  })
}

/**
 * @description: 客户资料新增
 * @param {*} data
 * @return {*}
 */
export function addCustomerItem(data) {
  return request({
    url: '/customer/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取客户资料详情
 * @param {*} params
 * @return {*}
 */
export function getCustomerDetail(params) {
  return request({
    url: '/customer/detail',
    params
  })
}

/**
 * @description: 更新客户资料
 * @param {*} data
 * @return {*}
 */
export function updateCustomerItem(data) {
  return request({
    url: '/customer/update',
    method: 'post',
    data
  })
}

/**
 * @description: 删除客户资料
 * @param {*} data
 * @return {*}
 */
export function deleteCustomerItem(data) {
  return request({
    url: '/customer/delete',
    method: 'post',
    data
  })
}
